package com.hzjy.api.controller;

import com.hzjy.api.service.impl.ApiDictServiceImpl;
import com.hzjy.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 前端字典
 */
@RestController
@RequestMapping("/api/dict/data")
public class ApiDictController {
    @Autowired
    private ApiDictServiceImpl dictTypeService;
    /**
     * 根据字典类型查询字典数据信息
     */
    @GetMapping(value = "/type/{dictType}")
    public AjaxResult dictType(@PathVariable String dictType)
    {
        return AjaxResult.success(dictTypeService.selectDictDataByType(dictType));
    }
}
